﻿<%@ page contentType="text/html;charset=UTF-8" trimDirectiveWhitespaces="true" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>实时预览Demo</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    
    <SCRIPT>
    /*****实时预览******/
    function StartPlayView()
    {
        var OCXobj = document.getElementById("PlayViewOCX");
		var previewXml = document.getElementById("config").value;
		var ret = OCXobj.StartTask_Preview_InWnd(previewXml,0);
    }

    function init(){
	var OCXobj = document.getElementById("PlayViewOCX");
	OCXobj.SetOcxMode(0);
    }    
    </SCRIPT>
    


</head>
<body onLoad="init();">

<div>1.请调用webservice接口CuService中的getStreamServiceByCameraIndexCodes方法来获得参数报文，把获得的XML按文档说明额外设置后填入下方的文本域</div>

<textarea name="config" id="config" cols="100" rows="30" value="">
<?xml version="1.0" encoding="UTF-8"?>
<Message>
  <Camera>
    <Id>377</Id>
    <IndexCode>33000000001310016872</IndexCode>
    <Name>校大门球机1</Name>
    <ChanNo>0</ChanNo>
    <Matrix Code="0" Id="0" />
  </Camera>
  <Dev regtype="0" devtype="10011">
    <Id>113</Id>
    <IndexCode>33000000001310924041</IndexCode>
    <Addr IP="172.16.2.112" Port="8000" />
    <Auth User="admin" Pwd="12345" />
  </Dev>
  <Vag IP="10.0.13.178" Port="7302" />
  <Voice>
    <Encode>1</Encode>
  </Voice>
  <Media Protocol="0" Stream="0">
    <Vtdu IP="10.0.13.180" Port="554" />
    <NetZoneId id="100001" />
  </Media>
  <Privilege Priority="51" Code="30" />
  <Option>
    <Talk>1</Talk>
    <PreviewType>0</PreviewType>
  </Option>
</Message>
</textarea>


<input type="button" value="开始预览" onclick="StartPlayView()" />

            
<object classid="clsid:04DE0049-8359-486e-9BE7-1144BA270F6A" id="PlayViewOCX"  width="750" height="450" name="ocx" >
            </object>

</body>
</html>


